/*—————————————————————————————————————————————————————————— 登录页面公共数据 ——————————————————————————————————————————————————————————*/
import { loginFormItems } from './interface'

// form表单标题内容
export const loginFormHead = (
  <div>
    {/* 标题 */}
    {/* ========================================================================================= */}
    <h3 className="userNoSelect">Log On</h3>

    {/* 副标题 */}
    {/* ========================================================================================= */}
    <p className="userNoSelect">输入您的用户名和密码以登录</p>
  </div>
)

// form表单渲染内容列表
export const formItems: loginFormItems = [
  {
    name: 'name',
    type: 'input',
    label: '用户名',
    rules: [
      { required: true, message: '用户名不能为空' },
      { type: 'string' },
      { max: 12, message: '用户名不能超过12位' },
    ],
    itemconfig: {
      placeholder: '请输入您的用户名',
      maxLength: 15,
    },
  },
  {
    name: 'password',
    type: 'password',
    label: '密码',
    rules: [
      { required: true, message: '密码不能为空' },
      { type: 'string' },
      { min: 6, message: '密码不能低于6位' },
      { max: 12, message: '密码最多12位' },
    ],
    itemconfig: {
      placeholder: '请输入您的密码',
      maxLength: 16,
    },
  },
  {
    name: 'remember',
    type: 'switch',
    col: {
      className: 'Login-form-remember',
    },
    noStyle: true,
    extraRendering: <span>记住密码</span>,
  },
]
